Description
Most generated files fall into one of two main categories, referred to as 'base files' and 'derived files'.
Base Files
Base files contain generated code that the user need not be involved with, and this code should never be modified by the user. The translator will overwrite these files and so any edits would be lost.
Derived Files
The derived files contain both default code and function stubs that can/should be modified by the user. In this code layer, the user can reference any external classes, functions or libraries. These references typically require user generated header files which need to be explicitly included in the system generated derived files.
Include File Scope
The 'scope' of the user specified include files will depend upon the particular derived files that the include statements are 'added-to'. Include files that are inserted into derived 'CPP' files will only be visible to the particular files that they are inserted into, but if they are inserted into derived 'HPP' files then they will be visible to multiple files.
Circuits need to include the header files of each of their child objects, ( nodal objects, references and sub-circuits) and so if a user include is inserted into a derived child object file then its parent circuit, grandparent and so on, all the way up to the top-level container, will have visibility of the user included file.
Store data and record files can also require inclusion of user defined headers, and in that case, the included headers will be visible to any child object that has a connection to the store.
Headers that are included in the project header 'ProjectHeader.hpp' will be globally visible.
As a general rule, constants and utility functions/macros should be made available to the entire project, but processing specific information should be restricted to particular methods, threads and call-backs.